package com.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class MyAdvice3 implements MethodInterceptor {
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println(
                "环绕前、。。。。"
        );
        //执行目标
        Object res = invocation.getMethod().invoke(invocation.getThis(),invocation.getArguments());
        System.out.println("环绕后。。。。。。");
        return res;
    }
}
